<!--
 * @Authoer: luodp
 * @Description:执行器管理
 * @Date 2018/1/23 14:16
 * @Modified By:
 *
-->
<div id="triggergroup_grid">
  <yu-panel :title="$t('taskExecutorManager.zxqgl')" :hide-filter="false">
    <template slot="filter">
      <yu-xform v-model="formdata" related-table-name="infotable" form-type="search">
        <yu-xform-group :column="4">
          <yu-xform-item label="AppName" placeholder="AppName" ctype="input" name="appName"></yu-xform-item>
          <yu-xform-item :label="$t('taskExecutorManager.mz')" :placeholder="$t('taskExecutorManager.mz')" ctype="input"
            name="title"></yu-xform-item>
          <yu-xform-item :label="$t('taskExecutorManager.zcfs')" :placeholder="$t('taskExecutorManager.zcfs')"
            ctype="select" name="addressType" data-code="TRIGGER_REGTYPE"></yu-xform-item>
        </yu-xform-group>
      </yu-xform>
    </template>
    <template slot="right">
      <yu-toolBar>
        <el-button @click="openCreateFn" v-if="createButton">{{ $t('taskExecutorManager.xz') }}</el-button>
        <el-button @click="openEditFn" v-if="editButton">{{ $t('taskExecutorManager.xg') }}</el-button>
        <el-button @click="deletestFn" v-if="deleteButton">{{ $t('taskExecutorManager.sc') }}</el-button>
      </yu-toolBar>
    </template>
    <el-table-x ref="infotable" :radiobox="true" :max-height="mainGrid.height" :data-url="mainGrid.dataUrl"
      :data-params="mainGrid.dataParams" :table-columns="mainGrid.tableColumns" @custom-detail-click="openDetailFn">
    </el-table-x>
  </yu-panel>
  <el-dialog-x :center="true" :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" height="370px"
    width="700px">
    <el-collapse v-model="activeName">
      <el-collapse-item :title="$t('taskExecutorManager.zxqjbxx')" name="1">
        <el-form-x ref="form" :group-fields="updateFields" :disabled="formDisabled" label-width="110px"></el-form-x>
      </el-collapse-item>
      <el-collapse-item :title="$t('taskExecutorManager.kzxx')" name="2">
        <el-form-x ref="otherForm" :group-fields="updateOtherFields" :disabled="formDisabled" label-width="110px">
        </el-form-x>
      </el-collapse-item>
    </el-collapse>
    <div slot="footer" align="center">
      <el-button v-if="dialogStatus=='create'" type="primary" @click="saveCreateFn()">{{ $t('taskExecutorManager.qd') }}
      </el-button>
      <el-button v-if="dialogStatus=='update'" type="primary" @click="saveEditFn()">{{ $t('taskExecutorManager.qd') }}
      </el-button>
      <el-button @click="dialogFormVisible = false">{{ $t('taskExecutorManager.qx') }}</el-button>
    </div>
  </el-dialog-x>
</div>